package tests;

import java.util.ArrayList;

import engine.LeitorDeEngines;
import gui.Facade;
import junit.framework.TestCase;

public class ProcuraLegislacaoTest extends TestCase {
	private Facade facade;
	private final String Link = "http://www.lexml.gov.br/busca/search?f1-tipoDocumento=Legisla%C3%A7%C3%A3o&keyword=bebida&localidade=brasil&apelido=lei+seca";
	protected void setUp() { 
		facade = Facade.getInstance();
	} 


	public void testGeracaoDeLinks() {
		ArrayList<String> links;
		links = facade.pesquisa("bebida", null, null, null, null, null, 
											 null, "brasil", null, "lei seca", false, true);

		assertEquals("ERRO: Busca Legislacao", Link, links.get(0));


	}
	public void testTamanhoDoArrayDeLinks() {
		ArrayList<String> links;
		links = facade.pesquisa("bebida", null, null, null, null, null, 
				 null, "brasil", null, "lei seca", false, true);
		assertEquals("ERRO: Busca Legislacao", 1, links.size());
	}
}
